package com.zql;

public class c3 {

	static void printPyramid(int h) {
		
		for (int i = 1; i <= h; i++) {
			for (int k = h-i; k >=1;k--) {
				System.out.print(" ");
			}
			for (int j = 1; j <= i; j++) {
				System.out.print(j);
			}
			for (int j = 1; j <= i-1; j++) {
				System.out.print(j);
			}
			System.out.println();
		}
	}
	
	

	static void printPyramid(char c) {
		for (int i = 1; i <= (int)c-64; i++) {
			for (int k = c-i-64; k >=1;k--) {
				System.out.print(" ");
			}
			for (int j = 1; j <= i; j++) {
				System.out.print((char)(j+64));
			}
			for (int j = 1; j <= i-1; j++) {
				System.out.print((char)(j+64));
			}
			System.out.println();
		}
	}
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		printPyramid(7);
		printPyramid('G');
	}

}
